<?php
if ( function_exists('register_sidebar') )
    register_sidebar(array(
        'before_widget' => '<div class="widget">',
        'after_widget' => '</div>',
        'before_title' => '<div class="title"> <h2>',
        'after_title' => '</h2> </div>',
    ));
    function widget_mytheme_search() {
?>
	<div class="widget">
		<div class="title"><h2>Browse</h2></div>
		<select name="archivemenu" onChange="document.location.href=this.options[this.selectedIndex].value;">
		<option value="">Monthly Archives</option>
<?php get_archives('monthly','','option','','',''); ?>
		</select>		
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
	</div>
<?php
}
if ( function_exists('register_sidebar_widget') )
    register_sidebar_widget(__('Search'), 'widget_mytheme_search');

define('HEADER_TEXTCOLOR', '');
define('HEADER_IMAGE', '%s/images/mainpic01.jpg'); // %s is theme dir uri
define('HEADER_IMAGE_WIDTH', 736);
define('HEADER_IMAGE_HEIGHT', 229);
define( 'NO_HEADER_TEXT', true );

function oceanmist_admin_header_style() {
?>
<style type="text/css">
#headimg {
	background: url(<?php header_image() ?>) no-repeat;
}
#headimg {
	height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
	width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
}

#headimg h1, #headimg #desc {
	display: none;
}
</style>
<?php
}
function oceanmist_header_style() {
?>
<style type="text/css">
#mainpic {
	background: url(<?php header_image() ?>) no-repeat;
}
</style>
<?php
}
if ( function_exists('add_custom_image_header') ) {
	add_custom_image_header('oceanmist_header_style', 'oceanmist_admin_header_style');
}

?>
